class RemoveUselessTables < ActiveRecord::Migration
  def up
    rename_table :actors, :terminals
    rename_column :terminals, :name, :mac
    add_column :terminals, :online, :boolean, default: false
    add_index :terminals, :online 
    add_column :traffics, :flow, :integer, default: 0
    add_column :traffics, :device_type, :string
    add_column :traffics, :device_id, :integer
    add_index :traffics, [:device_id, :device_type]
    rename_table :frequencies, :apps
  end

  def down
  end
end
